The present invention relates in general to digital communication networks, and is particularly directed to a new and improved mechanism for compensating for variable transport delay encountered in a packet-based digital voice network, by dynamically updating, as necessary, the value of buffer delay injected at a receive decoder end of the network, so as to maintain the buffer delay at a value associated with the maximum value of transport delay that has been encountered in the course of a call.
Digital voice networks are generally comprised of two principal building blocksxe2x80x94an encoder and a decoderxe2x80x94that are customarily implemented in a single piece of encode/decode hardware known as a CODEC. As diagrammatically shown in FIG. 1, respective CODECs 1 and 2 are installed at opposite ends of a communication channel 3, that provides digital transport capability between equipments at respective xe2x80x98westxe2x80x99 and xe2x80x98eastxe2x80x99 sites 4 and 5 of the network. The respective encoder portions 1E and 2E of CODECs 1 and 2 sample analog voice signals supplied thereto at a prescribed sampling frequency and convert the samples a digital representation suitable for transport over the channel 3. The sampling rate of an analog voice signal in conjunction with the amount of data per sample determines the required bandwidth for the channel.
In a typical network, each voice channel is assigned to a dedicated time-slot of a time division multiplexed (TDM) network. Because each voice channel has a dedicated time slot, data arrives at the decoder portion of the CODEC in a very constant and predictable manner. This is diagrammatically illustrated in the timing diagram 20 of FIG. 2, where successive TDM data packets 21-25 are shown as being equally spaced apart by respective spacings a in successive ones of an arbitrary sequence of packet intervals 11-15 within a voice channel of interest, so as to enable the CODEC to convert the data back into an analog voice signal.
A shortcoming of such a TDM voice network is that when no voice call is being made, the dedicated bandwidth for that voice channel is wasted. To overcome this wasted bandwidth problem, statistically based packet switching networks have been developed, in which bandwidth is statistically multiplexed on an as-needed basis. In such a packet switched network, the available bandwidth may be considered to be a single large xe2x80x9cpipexe2x80x9d into which packets of data are inserted.
As shown diagrammatically in FIG. 3, digitized data (voice or otherwise) to be transported is segmented into small segments or packets 40, which are placed into a queue 42 and then transmitted, in the order in which they are placed into the queue, by a transceiver 44 over the digital communication channel 46 to a CODEC 50 at the far end of the channel. Each packet of data occupies the entire bandwidth for a small period of time.
Now although packet-based networks overcome the wasted bandwidth problem, they also introduce a variable amount of delay into the network. Namely, because packets do not have a dedicated time-slot, their arrival at the receive or far end of the network will depend upon on how much data has been queued up in front of them. While this variable delay may not be of particular concern for data-only applications, it can become quite noticeable in voice applications. This problem is illustrated diagrammatically in the above-referenced timing signal diagram 30 of FIG. 2, which shows the example of a first voice packet 31 arriving on time in packet interval 11, while the next two voice packets 32 and 33 are delayed by a relatively large interval xcex2, and do not arrive until interval 14 during which data packet 34 is expected.
As pointed out above, the decoder portion of the CODEC 50 requires that data be supplied at a constant interval. Since there is no data present at any time during the packet intervals 12 and 13, and it is further delayed in interval 14, the decoder cannot reliably reproduce the original audio during this period. This condition may or may not be detectable by the human ear, depending on the length of the delay and the mechanism employed by the decoder to handle the idle time between packets. This problem is compounded by the fact that the late packets can be expected to eventually arrive, at which time the decoder has to decide what to do with them (since their time slots (intervals 12 and 13) have already passed). If this sequence of events occurs often enough, it can degrade voice performance to the point that the CODEC is not useable.
One way to counter this problem, diagrammatically shown in FIG. 4, is to delay the packets (under the control of an attendant microcontroller, shown at 55) through a buffer 60, such as a first-in, first-out data register (or FIFO), that is inserted into the receive or decoder end of the transport path through the CODEC 50. The challenge is to determine the proper amount of buffering (delay), that will allow the listener to comfortably discern the voice signals that the received packets represent. One approach is to establish a fixed delay at the beginning of a call, by buffering a given number of packets that are estimated to compensate for a reasonable amount of transport variance in the network. While this approach can work reasonably well, it has the shortcoming that a fixed delay buffer delay does not take into account actual network conditions. The amount of buffering needed to ensure proper operation at worst-case may be large enough to be discernible by and unacceptable to some individuals.
The present invention solves the foregoing problem by automatically dynamically adjusting (increasing) the size of (or delay through) the buffer, based upon actual network conditions as they are encountered during a call. As will be described, the present invention operates on the premise that, if one or more packets are delayed in the network, their eventual arrival can be expected to be at a rate that is too fast to be processed in real-time by the decoder. Such eventual arrival may be exhibited as a string of immediately successive voice packets arriving a relatively large interval after arrival of a previous packet in its expected packet interval.
As will be described the delay adjustment mechanism of the invention handles this problem in two parts. The first answers the question of what to do (namely what to provide over the decoderxe2x80x94listener path) during the delay period (when no packets are being received). Where the delay is reasonably brief and the amount of information in each packet is small, the last received packet is replayed in place of the missing packets. However, if delays are long, replaying the same packet over and over can begin sounding very unnatural. In this case, after the expiration of a user-programmed amount of time, the decoder may stop replaying the packet and begin playing silence.
The second question is what to do with the late-arriving packets. In accordance with the present invention, late arriving packets are written into the delay buffer in the order that they arrive. They are then played out from the buffer at the nominal decoder data processing rate. Once some number of packets have been buffered in this manner, any further delay of the same duration or shorter than that currently provided by the buffer will not be heard by the user, since previously stored packets will be read out of the buffer in a periodic manner (and thereby played out to the listener) during the delay interval.
However, should a longer network transport delay be encountered, an outage may be noticed, but only for the period of time exceeding the original outage. As a consequence, in the absence of an increase in network transport delay in excess of the delay interval, the decoder will remain some number of packets behind (missing or not received during the delay interval) for the duration of the call, introducing an overall end-to-end delay into the system. Should another delay of this same duration or less occur, the decoder will not be affected, as it will have a constant supply of packets from the input buffer.
The amount of delay through the buffer will thereby be effectively equal to the largest delay encountered up to that point. In other words, delay is only inserted as it is required. It should be noted that once delay is encountered during a call, it is likely that another delay will follow. For this reason, any delay added by the buffering of packets is maintained for the duration of the call. Attempting to reduce the buffer size in real time would only cause more delays to be noticed by the user.